package com.cx.android;

import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;
import android.widget.RemoteViewsService;

class Code1009AppWidgetRemoteViewsFactory implements RemoteViewsService.RemoteViewsFactory {
    private Context mContext;
//    private int mAppWidgetId;
    
    public Code1009AppWidgetRemoteViewsFactory(Context context, Intent intent) {
        mContext     = context;
//        mAppWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
    }

    public void onCreate() {
    }

    public void onDestroy() {
    }    

    //
    public void onDataSetChanged() {
    }
    
    //
    public int getCount() {
        return 1;
    }
    public int getViewTypeCount() {
        return 1;
    }   
    
    public boolean hasStableIds() {
        return true;
    }
    public RemoteViews getLoadingView() {
    	// You can create a custom loading view (for instance when getViewAt() is slow. 
    	// If you return null here, you will get the default loading view.    	
        return null;
    }

    ///
    public RemoteViews getViewAt(int position) {
        final int itemId = R.layout.lo_appwidget;
        RemoteViews rv = new RemoteViews(mContext.getPackageName(), itemId);

        return rv;
    }
    
    public long getItemId(int position) {
        return position;
    }
    
}
